@extends('layouts.app', ['activePage' => 'competition', 'titlePage' => __('比赛管理')])

@section('content')
<div class="content">
  <div class="container-fluid">
    <div class="row">
      <div class="col-md-12">
        <form method="post" action="/competitions" autocomplete="off" class="form-horizontal">
          @csrf
          @method('post')

          <div class="card ">
            <div class="card-header card-header-primary">
              <h4 class="card-title">比赛报名列表</h4>
              <p class="card-category">当前比赛->{{$title}}</p>
            </div>
            <div class="card-body ">
              <div class="row">
                <div class="col-md-12 text-right">
                    <a href="/competitions" class="btn btn-sm btn-primary">返回比赛列表</a>
                </div>
              </div>

              <table class="table">
                <thead class="text-primary text-center">
                    <th>编号</th>
                    <th>姓名</th>
                    <th>性别</th>
                    <th>出生年月</th>
                    <th>联系方式</th>
                    <th>报名时间</th>
                    <th>报名状态</th>
                </thead>
                <tbody>
                  @foreach ($signlist as $item)
                      <tr class="text-center">
                        <td>
                            {{ $loop->iteration }}
                        </td>
                        <td>
                            {{ $item->username }}
                        </td>
                        <td>
                            @if ( $item->gender )
                            男
                            @else
                            女
                            @endif
                        </td>
                        <td>
                            {{ $item->birthdate }}
                        </td>
                        <td>
                            {{ $item->tel }}
                        </td>
                        <td>
                            {{ $item->signup_time }}
                        </td>
                        <td>
                          @if ( $item->status )
                          <span class="badge badge-success">已支付</span>
                          @else
                          <span class="badge badge-danger">未支付</span>
                          @endif
                        </td>
                    </tr>
                  @endforeach
                </tbody>
            </table>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
</div>
@endsection
